﻿using System;

namespace Homework8_Order
{
    public class Program
    {
        static void Main(string[] args)
        {
            OrderService service = new OrderService();

            Order firstOrder = new Order(1, "小黑");
            OrderItem apple1 = new OrderItem(5, 10, "苹果");
            OrderItem peer1 = new OrderItem(4, 5, "梨");
            firstOrder.addOrderItem(apple1);
            firstOrder.addOrderItem(peer1);

            Order secondOrder = new Order(2, "小红");
            OrderItem apple2 = new OrderItem(5, 10, "苹果");
            OrderItem peer2 = new OrderItem(4, 5, "梨");
            secondOrder.addOrderItem(apple2);
            secondOrder.addOrderItem(peer2);

            //Order thirdOrder = new Order(2, "小红");

            service.addOrder(firstOrder);
            service.addOrder(secondOrder);
            //service.addOrder(thirdOrder);

            service.Export("d://test.xml");
            service.Import("d://test.xml");

            /*service.searchOrder(1);
            service.searchOrder(2);
            service.deleteOrder(1);
            service.searchOrder(1);
            service.searchOrder("小红");*/
        }
    }
}
